﻿using ManYan.Domain.Model.ValueObject;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;

namespace ManYan.Domain.Model.Entity
{
    [Table("tb_exam_content")]
    public class tb_exam_content
    {
        [Key]
        public Guid Id { get; set; }
        [Required]

        public string Title { get; set; }
        [Required]
        public string Content { get; set; }

        public Guid CateId { get; set; }

        public Guid cateParent { get; set; }

        //public int Status { get; set; }

        /// <summary>
        /// 创建人id
        /// </summary>
        public Guid CreateUserId { get; private set; }
        /// <summary>
        /// 创建人名称
        /// </summary>
        [StringLength(50)]
        public string CreateUserName { get; private set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatDateTime { get; private set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get; set; }

        /// <summary>
        /// 是否热门
        /// </summary>
        public bool IsHot { get; set; }

        public string Author { get; set; }

        public string Source { get; set; }

        public tb_exam_content(string title,string content, string createUserName, string author, string source)
        {
            this.Title = title;
            this.Content = content;
            this.CreateUserName = createUserName;
            Author = author;
            Source = source;    
        }
        /// <summary>
        /// 类初始化
        /// </summary>
        public tb_exam_content()
        {
            this.Id = new Guid();
            this.Title = string.Empty;
            this.Content = string.Empty;
            this.CreateUserName = string.Empty;
            this.Author = string.Empty;
            this.Source = string.Empty;
            this.CreatDateTime = System.DateTime.Now;//默认创建时间
        }
        [NotMapped]
       public tb_system_nav_info nav { get; set; }
    }
}
